<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="com.sakila.dao.FilmActorDAO"  
    import="java.util.List"
    import="com.sakila.dbo.FilmActorDBO" import="java.util.Iterator" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
 
 <%
  	List<FilmActorDBO> list = new FilmActorDAO().findAll();
  %>

<table border="1">
   <tr bgcolor="yellow">
     <th>Actor ID</th>
     <th>Film Id</th>
     
     <th>Last Update</th>
   </tr>
   <%
   Iterator<FilmActorDBO> it = list.iterator();
   int count = 0;
   while(it.hasNext()){
	   count++;
	   FilmActorDBO aco = it.next();

   /* 	for(FilmActorDBO aco: list){ */
   %>
   <tr bgcolor="lightblue">
     <td><%= aco.getActor_id()%></td>
     <td><%=aco.getFilm_id()%></td>
     
    <td><%=aco.getLast_update()%></td> 
   </tr>
   <%}
   System.out.println(count);
   %>
 </table>
</body>
</html>